﻿Imports VN.INS.DL.DALC
Imports VN.INS.BL.BE
Public Class FinancieroBC

    Public Function carga_grillafinanciero(ByVal strPoa As String, ByVal strPeriodo As String, ByVal strVersion As String) As DataTable
        Dim objMONITOREODA As FinancieroDA

        Dim objDt As DataTable

        Try
            objMONITOREODA = New FinancieroDA
            objDt = objMONITOREODA.carga_grillafinanciero(strPoa, strPeriodo, strVersion)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Function carga_financiero_ed(ByVal strPoa As String, ByVal strPeriodo As String, ByVal strVersion As String) As DataTable
        Dim objMONITOREODA As FinancieroDA

        Dim objDt As DataTable

        Try
            objMONITOREODA = New FinancieroDA
            objDt = objMONITOREODA.carga_financiero_ed(strPoa, strPeriodo, strVersion)
            Return objDt
        Catch ex As Exception
            Throw ex
        End Try
    End Function

    Public Sub insertar_financiero_per(ByVal IDPOACT As String, ByVal IDPLAN As String, ByVal MTM1 As String, ByVal Ejec_Mes_Aux As String, ByVal IDFPER As String,
                                ByVal MTM2 As String, ByVal MTM3 As String, ByVal MTM4 As String, ByVal OB As String, ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As String, ByVal E As String,
                                ByVal TV1 As String, ByVal TV2 As String, ByVal TV3 As String, ByVal TV4 As String, ByVal strVersion As String)
        Dim objfinancieroDA As FinancieroDA

        Try
            objfinancieroDA = New FinancieroDA
            objfinancieroDA.insertar_financiero_per(IDPLAN, IDPOACT, IDFPER, Ejec_Mes_Aux, MTM1, MTM2, MTM3, MTM4, OB, F1, F2, F3, F4, E, TV1, TV2, TV3, TV4, strVersion)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Sub edicion_finaciero(ByVal Ejec_M As String, ByVal V1 As String, ByVal V2 As String, ByVal V3 As String, ByVal V4 As String, ByVal IDPFP As String, ByVal OB As String, ByVal F1 As String, ByVal F2 As String, ByVal F3 As String, ByVal F4 As String, ByVal E As String,
                                ByVal TV1 As String, ByVal TV2 As String, ByVal TV3 As String, ByVal TV4 As String, ByVal strVersion As String)
        Dim objMonitorDA As FinancieroDA

        Try
            objMonitorDA = New FinancieroDA
            objMonitorDA.edicion_finaciero(Ejec_M, V1, V2, V3, V4, IDPFP, OB, F1, F2, F3, F4, E, TV1, TV2, TV3, TV4, strVersion)

        Catch ex As Exception
            Throw ex
        End Try
    End Sub

    Public Function verifica_accion(ByVal poa As String, ByVal strPeriodo As String) As Integer
        Dim objFinancieroDA As FinancieroDA
        Dim NUMERO As Integer

        Try
            objFinancieroDA = New FinancieroDA
            NUMERO = objFinancieroDA.verifica_accion(poa, strPeriodo)
            Return NUMERO
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
